Method and computer program product for software/hardware language model conversion

ABSTRACT

The first model described in a software description language is converted into the second model described in a hardware description language without considering whether a plurality of parallel procedures for writing with respect to the same shared variable are contained in the first model. It is detected whether a plurality of parallel processes corresponding to the plurality of parallel procedures for writing with respect to the same shared variable exist in the second model obtained in this manner. A value solving process is generated, in which a pair of a data signal and an assignment timing signal are input from each process of all or some of the detected parallel processes, and a signal of the data signals which corresponds to a process in which the assignment timing signal has changed is output to a signal holding the value of the shared variable.

CROSS-REFERENCE TO RELATED APPLICATIONS

[0001] This application is based upon and claims the benefit of priority from the prior Japanese Patent Application No. 2001-024887, filed Jan. 31, 2001, the entire contents of which are incorporated herein by reference.

BACKGROUND OF THE INVENTION

[0002] 1. Field of the Invention

[0003] The present invention relates to a software/hardware language model conversion method and computer program product for automatically converting a software description into a hardware operation description.

[0004] 2. Description of the Related Art

[0005] Recently, attention has been given to the design of an overall system or hardware by using a software description language such as C, C++, or specification description language SpecC (described in detail in “SpecC: Specification Language and Methodology”, Daniel D. Gajski, Kluwer Academic Publishers, Dordrecht, ISBNO-7923-7822-9). This is a technique of describing a specification in a software description language and converting it into a specification in a hardware description language such as VHDL or Verilog to connect it to a downstream logic synthesizing tool in proceeding to detailed design of hardware.

[0006] Some tools for creating a hardware language model in the C language have already been commercialized. However, the codes to be input to such a tool are limited to those describing sequential processing. The tool is useful for partial design, but is not suitable for large-scale design because it includes portions that cannot be satisfactorily written in the form of a sequential specification. Demands have therefore arisen for software/hardware language model conversion that can support parallel programs.

[0007] Assume that a description in a software description language includes parallel programs. In this case, when the language is converted into a hardware description language at operation level, the manner of handling shared variables cannot be directly converted. More specifically, in software, values are determined in accordance with the order in which assignment is executed. In hardware description, if signal outputs from the respective parallel programs are simply connected, the values become undefined or determined regardless of the assignment order. Demands have therefore arisen for a method of systematically converting assignment to shared variables into assignment in hardware description.

[0008] Assume that a description in a software description language includes procedure calls that can operate parallel. In this case, when this description is converted into a hardware description language at operation level, the manner of handling calls for the same procedure cannot be directly converted. More specifically, if parallel procedures are replaced with processes, identical procedures can be simultaneously called. If, however, this operation is directly expressed by shake-hands using signals between the processes, exclusive calling cannot be realized. Demands have therefore arisen for a method of systematically creating an exclusive calling mechanism in the form of a code.

BRIEF SUMMARY OF THE INVENTION

[0009] The present invention has been made in consideration of the above situation, and has as its object to provide a software/hardware language model conversion method and computer program product for converting a software description including parallel programs and variables shared among them into a hardware description at operation level which operates in the same manner as the software description.

[0010] It is another object to provide a software/hardware language model conversion method and computer program product for realizing exclusive process execution processing corresponding to procedure calling in converting parallel programs in a software language into a hardware description.

[0011] According to one aspect of the present invention, there is provided a software/hardware language model conversion method for converting a first code described in a software description language to a second code described in a hardware description language. The method comprises: converting the first code to the second code; detecting a plurality of processes from the second code, the processes corresponding to a plurality of parallel procedures in the first code, which assign values to a predetermined shared variable; and generating a value solving process for the detected processes corresponding to the parallel procedures, wherein the value solving process includes pairs of a data signal and an assignment timing signal from each of the detected processes as an input, and includes any one of data signals corresponding to a change of the assignment timing signal, as an output.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWING

[0012]FIG. 1 is a block diagram showing an arrangement of a software/hardware language model conversion apparatus according to an embodiment of the present invention;

[0013]FIG. 2 is a view for explaining an example of a software description of parallel software programs sharing a variable;

[0014]FIG. 3 is a view for explaining an example of a hardware description including a value solving process, which is obtained by converting a software description of parallel software programs sharing a variable;

[0015]FIG. 4 is a view for explaining an example of a software description of hierarchically arranged parallel software programs sharing a variable;

[0016]FIG. 5 is a view for explaining an example of a hardware description including hierarchically arranged value solving processes, which is obtained by converting a software description of hierarchically arranged parallel software programs sharing a variable;

[0017]FIG. 6 is a flow chart showing an example of the procedure executed by the software/hardware language model conversion apparatus according to the embodiment;

[0018]FIG. 7 is a flow chart showing an example of the procedure executed by the software/hardware language model conversion apparatus according to the embodiment;

[0019]FIG. 8 is a flow chart showing an example of processing by a value solving process;

[0020]FIG. 9 is a flow chart showing another example of the procedure executed by the software/hardware language model conversion apparatus according to the embodiment;

[0021]FIG. 10 is a view for explaining an example of a hardware description obtained by deleting all value solving processes except for the value solving process at the highest level, which is obtained by converting a software description of hierarchically arranged parallel software programs sharing a variable;

[0022]FIG. 11 is a block diagram showing another example of the arrangement of the software/hardware language model conversion apparatus according to the embodiment;

[0023]FIG. 12 is a view for explaining an example of a hardware description including a procedure call switching process, which is obtained by converting a hardware description including a value solving process;

[0024]FIG. 13 is a flow chart showing still another example of the procedure executed by the software/hardware language model conversion apparatus according to the embodiment;

[0025]FIG. 14 is a view for explaining an example of a hardware description including hierarchically arranged procedure call switching processes, which is obtained by converting a hardware description including hierarchically arranged value solving processes;

[0026]FIG. 15 is a flow chart showing an example of processing by a procedure call switching process;

[0027]FIG. 16 is a flow chart showing still another example of the procedure executed by the software/hardware language model conversion apparatus according to the embodiment;

[0028]FIG. 17 is a view for explaining an example of a hardware description obtained by deleting all procedure call switching processes except for the procedure call switching process at the highest level, which is obtained by converting a hardware description obtained by deleting all value solving processes except for the value solving process at the highest level;

[0029]FIG. 18 is a block diagram showing an arrangement of a system design support apparatus according to the embodiment;

[0030]FIG. 19 is a block diagram showing an arrangement of a software/hardware language model conversion apparatus according to an alternative of the embodiment of the present invention; and

[0031]FIG. 20 is a flow chart showing an example of the procedure executed by the software/hardware language model conversion apparatus according to the alternative of the embodiment.

DETAILED DESCRIPTION OF THE INVENTION

[0032] An embodiment of the present invention will be described below with reference to the views of the accompanying drawing.

[0033]FIG. 18 shows an arrangement of a system design support apparatus 100 according to an embodiment of the present invention. As shown in FIG. 18, the system design support apparatus 100 includes a specification model description section 101, architecture search section 102, communication synthesizing section 103, hardware specification creation section 104, part formation/reuse section 105, software specification creation section 106, and system specification recording section 107. The system design support apparatus 100 can be formed by using, for example, a computer. In this case, each processing portion can be executed by a program.

[0034] The system specification recording section 107 is used to record input data and all or part of the processing result obtained by each processing section, e.g., a specification for software executed by a computer, a specification for hardware combined with semiconductor devices and the like, a specification for an incorporated system constituted by a combination of software and hardware, and a specification on system level for a specification for a business process such as a work flow, and other necessary data.

[0035] The specification model description section 101 supports a designer to describe specifications for computation contents and communication contents according to a predetermined specification description form. As a result of support provided by the specification model description section 101, a specification model is created. The specification description form includes, for example, a structured text form represented by a structured programming language, a structural chart form using graphs, and a table form using tables.

[0036] The architecture search section 102 divides a partial structure of a specification model into elements and distributing the elements to architecture elements while maintaining the contents of the specification in consideration of a supplied specification description model and an architecture (the arrangement of a hardware/software implementation environment). More specifically, parts constituting specifications for computation contents and communication contents designed by the specification model description section 101 are assigned to architecture elements.

[0037] The communication synthesizing section 103 inserts a communication procedure (protocol) between communication specification elements distributed by the architecture search section 102 and performs protocol conversion (rearrangement of a communication procedure) to match with a communication procedure in which the communication content specification is inserted.

[0038] The specification description models to be processed by the architecture search section 102 are not limited to those described by using the specification model description section 101, and may include models and the like described by other tools. The specification description models to be processed by the communication synthesizing section 103 are not limited to output results from the architecture search section 102 (or models obtained by correcting the results), and may include models described by other tools and the like.

[0039] The hardware specification creation section 104 creates a hardware specification described in hardware description language from a system specification.

[0040] The software specification creation section 106 creates a software specification from a system specification.

[0041] The hardware specification creation section 104 and software specification creation section 106 can process, for example, an output result from the specification model description section 101 (or information obtained by correcting the result), an output result from the architecture search section 102 (or information obtained by correcting the result), an output result from the communication synthesizing section 103 (or information obtained by correcting the result), or information described by other tools and the like.

[0042] The part formation/reuse section 105 forms a specification into parts and provides them for reuse in an entire or part of a design stage in the specification model description section 101, architecture search section 102, and communication synthesizing section 103.

[0043] A software/hardware language model conversion apparatus to be described in detail later is used for the hardware specification creation section 104 of the system design support apparatus in FIG. 18, thereby creating an HDL description from a system specification.

[0044]FIG. 1 shows an arrangement of a software/hardware language model conversion apparatus (to be referred to as a language model conversion apparatus hereinafter) according to an embodiment of the present invention.

[0045] As shown in FIG. 1, the language model conversion apparatus has a skeletal code creation section 1, code replacement section 2, and value solving process creation section 3.

[0046] From a model described in a software description language such as SpecC, this language model conversion apparatus creates a model described in a hardware description language such as VHDL (which operates in the same manner).

[0047] This language model conversion apparatus will be briefly described first with reference to FIG. 2 (a view for explaining a software description language model) and FIG. 3 (a view for explaining hardware description language model). Referring to FIGS. 2 and 3, reference numeral 1021 denotes a shared variable; 1023, procedures that can operate parallel; 1022, outputs from the procedures; 1011, a signal holding the value of the shared variable; 1015, processes that are executed parallel; 1012, a value solving process (the arrows represent inputting and outputting of signals) created by this language model conversion apparatus; 1013, an assignment data signal for the process; and 1014, an assignment timing signal for the process.

[0048] Assume that in a software description language, shared variables are set among parallel programs, as shown in FIG. 2. In this case, as shown in FIG. 3, in a hardware description language, this language model conversion apparatus creates an assignment data signal (1013) and assignment timing signal (1014) with respect to each shared variable for each process (1015) corresponding to a value holding signal (1011) and each parallel program (1023) that can write-access the shared variable. The apparatus then creates a value solving process (1012) for switching an output to the value holding signal (1011) to a data signal (1013) to be paired with the assignment timing signal (1014) in accordance with a change in the assignment timing signal (1014). The value solving process (1012) is created by creating processing (see FIG. 8) for assignment to the data signal (1013) at a portion corresponding to shared variable assignment in the input code and a change in the assignment timing signal (1014).

[0049] Assume that in a hardware description language model output after forming the procedures in an input software description language model into a hierarchical structure, parallel processes are formed into a hierarchical structure, as shown in FIG. 4. In this case, as shown in FIG. 5, value solving processes are set at the respective levels, and signals are connected in accordance with the respective levels. In this case, an assignment timing signal is added to the output of a lower-level value solving process. If there is a level difference, a value-reflecting wait is inserted.

[0050] The processing performed by this language model conversion apparatus will be described below.

[0051]FIG. 6 shows an example of the procedure executed by this language model conversion apparatus. As shown in FIG. 6, in this procedure, skeletal code creation processing (processing 1 to processing 6), code replacement creation processing (processing 7 and processing 8), and value solving process creation processing (processing 9 and processing 10) are performed.

[0052] Note that processing 1 to processing 10 to be described later can be performed in an arbitrary order as long as the execution order constraint shown in FIG. 7 (processing at the end side of an arrow must be executed after all processes at the start side of the arrow is completed). In addition, a plurality of processes may be executed parallel.

[0053] Assume that a source code in the SpecC language is input to create a VHDL source code. Assume also that a VHDL code to be output has a signal CLK as an input port signal with an IN attribute at each Entity, and its input value is a sync clock.

[0054] <Skeletal Code Creation Processing (Skeletal Code Creation Section 1)>

[0055] (Processing 1) A specification in the SpecC language is comprised of elements called C language global function, global variable, and class. Assume that in this language model conversion apparatus, only an element called class is converted. There are two types of classes, namely behavior and channel classes. In the language model conversion apparatus, each class is made to correspond to a pair of VHDL Entity and Architecture.

[0056] (Processing 2) A SpecC language class is comprised of a port variable, local variable, and function. In this language mode conversion apparatus, a port variable is made to correspond to a corresponding Architecture port signal; a local variable, to an Architecture local signal; and a function, to an Architecture process.

[0057] (Processing 3) A port variable in a SpecC language class has three types of directional attributes, namely an input attribute (in), output attribute (out), and input/output attribute (inout). In processing 2 described above, replacement of a port variable with a port signal is performed in the following manner in accordance with the directional attributes.

[0058] In the case of the input attribute (in), a signal with the IN attribute (a total of one signal) is made to correspond to the attribute.

[0059] In the case of the output attribute (out), a signal with the OUT attribute (a total of one signal) is made to correspond to the attribute.

[0060] In the case of the input/output attribute (inout), signals with the IN attribute and OUT attribute are made to correspond to the attribute.

[0061] (Processing 4) With respect to functions in a SpecC language class, an execution trigger signal (an input signal for a process) and execution state signal (an output signal for the process) are defined as call signals. With respect to a function called outside the class, a call signal is defined as an Entity port signal. If a function has an argument or return value, a corresponding input/output signal is defined at a port in the same manner.

[0062] (Processing 5) At the start of a process, a code corresponding to an external call for a function is generated in the following manner:

[0063] process

[0064] begin

[0065] execution state signal<=‘0’;

[0066] wait until execution trigger signal=‘1’;

[0067] execution state signal<=‘1’;

[0068] wait until CLK=‘1’ and CLK′EVENT;

[0069] processing within function

[0070] end process

[0071] (Processing 6) With respect to a code in a function, a local variable in the function is made to correspond to a VHDL process variable. A variable assignment statement is made to correspond to an assignment statement; and wait, to a wait statement. A control syntax such as “if” is made to correspond to “VHDL if” or the like. A call for a function is made to correspond to the following code by using the signal created in processing 4 described above.

[0072] execution trigger signal<=‘1’;

[0073] wait until execution state signal=‘1’;

[0074] execution trigger signal<=‘0’

[0075] wait until execution state signal=‘0’

[0076] <Code Replacement Processing (Code Replacement Section 2)>

[0077] (Processing 7) A signal assignment in a VHDL process block is not immediately reflected in a signal value. It is reflected when a wait statement is processed. In consideration of this effect, conversion is performed as follows. A temporary process variable is defined with respect to a VHDL signal. An assignment statement for variable:=signal; is generated immediately after the wait statement, and an assignment statement for signal<=variable; is generated immediately before the wait statement. An assignment statement to a SpecC language function exterior variable is an assignment statement to an exterior variable. In addition, the value of a temporary variable is to be referred to as the signal value.

[0078] Consider, for example, the following SpecC language code with a serving as a function exterior variable.

[0079] waitfor 100;

[0080] a=1;

[0081] a=a+1;

[0082] waitfor 100;

[0083] The following is a corresponding VHDL code, in which a represents a signal corresponding to the SpecC variable a, and tmp_a is a temporary process variable corresponding to the signal.

[0084] wait for 100 ns;

[0085] tmp_a:=a;

[0086] tmp_a:=1;

[0087] tmp_a:=tmp_a+1;

[0088] a<=tmp₁₃ a;

[0089] wait for 100 ns;

[0090] If, however, an assignment destination corresponds to a SpecC language port variable, assignment is made to a signal with the OUT attribute instead of the above signal. In the case of a local signal, no special change is required.

[0091] If a SpecC language variable is of the event type, no temporary variable is generated.

[0092] Assume that in a method of representing the occurrence of an event, an event signal takes a value of ‘1’ during one clock. With regard to an event variable, “notify e;” corresponds to assignment.

[0093] notify e;

[0094] waitfor 100;

[0095] The above code is made to correspond to the following code:

[0096] e<=‘1’;

[0097] wait until CLK=‘1’ and CLK′EVENT;

[0098] e<=‘0’;

[0099] wait for 100 ns;

[0100] Although an event is referred to at “wait e;”, a VHDL code corresponding to this code is

[0101] wait until e=‘1’;

[0102] (Processing 8) A SpecC language class can form another class into an instance. The formation of an instance is made to correspond to a VHDL port_map declaration. However, a port may be segmented into a plurality of elements in processing 3 described above. For this reason, if a port is connected to a local variable, and the same signal is connected to a port variable, a signal with the same directional attribute is connected.

[0103] Consider, for example, the following SpecC language code: behavior B0(inout int b); behavior B1(inout int a){   B2 aB2(a);   //... }; A VHDL code corresponding to this code is Entity B1 is port(a:in integer; a_out integer;...); end B1; Architecture B1 od B1 is Component B0 is port(b: in integer; b_out: out integer;...); end component; begin   aB2: B2 port map(a, a_out,...);   -- ... end B1;

[0104] <Value Solving Process Creation Processing (Value Solving Process Creation Section 3)>

[0105] (Processing 9) In each Architecture, signals subjected to assignment from a plurality of processes and port_map are detected.

[0106] With respect to a detected signal sig, (a) a data signal sig_out_f and assignment timing signal sig_otrig_f are defined as Architecture local signals for a process f to which the signals are to be assigned.

[0107] (b) The signal created in (a) is input to create a value solving process with the signal sig serving as an output.

[0108]FIG. 8 shows an algorithm implemented by a process.

[0109] (c) Assignment statement sig<=expression; to “sig” in each process is replaced as follows:

[0110] sig_out_f<=expression;

[0111] sig_otrig<=‘1’;

[0112] wait until CLK=‘1’ and CLK′EVENT;

[0113] sig_otrig<=‘0’;

[0114] With regard to a value solving process for a signal for function execution control, processing associated with an execution trigger and argument is performed altogether. This is because the execution trigger signal can play a role similar to that of an assignment timing signal.

[0115] (Processing 10) If a signal to which the value solving process created by processing 9 described above is output is Entity Port, an assignment timing signal may be created in processing 9. In this case, as an output of the value solving process, an assignment timing signal is added, and processing is added to change the value of the assignment timing signal at the timing when the value solving process performs processing and outputs the resultant data to an output destination.

[0116] With the above procedure, for example, a VHDL code having a structure like that shown in FIG. 5 is created from a SpecC language code having a structure like that shown in FIG. 4.

[0117] An alternative of the embodiment is described bellow with reference to FIG. 19 and FIG. 20.

[0118]FIG. 20 shows an example of the procedure executed by the alternative of the language model conversion apparatus. As shown in FIG. 20, in this procedure, shared variable detection processing (processing 0), skeletal code creation processing (processing 1 to processing 6), code replacement creation processing (processing 7′ and processing 8), and value solving process creation processing (processing 9′ and processing 10) are performed.

[0119] Note that processing 1 to processing 10 to be described later can be performed in an arbitrary order as long as the execution order constraint shown in FIG. 7 (processing at the end side of an arrow must be executed after all processes at the start side of the arrow is completed). In addition, a plurality of processes may be executed parallel.

[0120] Assume that a source code described in the SpecC language is input to create a VHDL source code. Assume also that a VHDL code to be output has a signal CLK as an input port signal with an IN attribute at each Entity, and its input value is a sync clock.

[0121] <Shared Variable Detection Processing>

[0122] (Processing 0) With regarding to variables and port variables in a class, descriptions, namely “assignment descriptions” in which functions or instances thereof update the variables, are detected from the SpecC code. Let us call such the variables as “shared variable”. To the shared variables, information in order to identify each of the shared variables and information indicating that which of the functions or instances thereof assigned a value to the shared variable are associated therewith and are preserved.

[0123] <Skeletal Code Creation Processing (Skeletal Code Creation Section 1)>

[0124] (Processing 1) A specification in the SpecC language is comprised of elements called C language global function, global variable, and class. Assume that in this language model conversion apparatus, only an element called class is converted. There are two types of classes, namely behavior and channel classes. In the language model conversion apparatus, each class is made to correspond to a pair of VHDL Entity and Architecture.

[0125] (Processing 2) A SpecC language class is comprised of a port variable, local variable, and function. In this language mode conversion apparatus, a port variable is made to correspond to a corresponding Architecture port signal; a local variable, to an Architecture local signal; and a function, to an Architecture process.

[0126] (Processing 3) A port variable in a SpecC language class has three types of directional attributes, namely an input attribute (in), output attribute (out), and input/output attribute (inout). In processing 2 described above, replacement of a port variable with a port signal is performed in the following manner in accordance with the directional attributes.

[0127] In the case of the input attribute (in), a signal with the IN attribute (a total of one signal) is made to correspond to the attribute.

[0128] In the case of the output attribute (out), a signal with the OUT attribute (a total of one signal) is made to correspond to the attribute.

[0129] In the case of the input/output attribute (inout), signals with the IN attribute and OUT. attribute are made to correspond to the attribute.

[0130] (Processing 4) With respect to functions in a SpecC language class, an execution trigger signal (an input signal for a process) and execution state signal (an output signal for the process) are defined as call signals. With respect to a function called outside the class, a call signal is defined as an Entity port signal. If a function has an argument or return value, a corresponding input/output signal is defined at a port in the same manner.

[0131] (Processing 5) At the start of a process, a code corresponding to an external call for a function is generated in the following manner:

[0132] process

[0133] begin

[0134] execution state signal<=‘0’;

[0135] wait until execution trigger signal=‘1’;

[0136] execution state signal<=‘1’;

[0137] wait until CLK=‘1’ and CLK′EVENT;

[0138] processing within function

[0139] end process

[0140] (Processing 6) With respect to a code in a function, a local variable in the function is made to correspond to a VHDL process variable. A variable assignment statement is made to correspond to an assignment statement; and wait, to a wait statement. A control syntax such as “if” is made to correspond to “VHDL if” or the like. A call for a function is made to correspond to the following code by using the signal created in processing 4 described above.

[0141] execution trigger signal<=‘1’;

[0142] wait until execution state signal=‘1’;

[0143] execution trigger signal<=‘0’

[0144] wait until execution state signal=‘0’

[0145] (Processing 7′) A signal assignment in a VHDL process block is not immediately reflected in a signal value. It is reflected when a wait statement is processed. In consideration of this effect, conversion is performed as follows. A temporary process variable is defined with respect to a VHDL signal. An assignment statement for variable:=signal; is generated immediately after the wait statement, and an assignment statement for signal<=variable; is generated immediately before the wait statement. An assignment statement to a SpecC language function exterior variable is an assignment statement to an exterior variable. In addition, the value of a temporary variable is to be referred to as the signal value.

[0146] Consider, for example, the following SpecC language code with a serving as a function exterior variable.

[0147] waitfor 100;

[0148] a=1;

[0149] a=a+1;

[0150] waitfor 100;

[0151] The following is a corresponding VHDL code, in which a represents a signal corresponding to the SpecC variable a, and tmp_a is a temporary process variable corresponding to the signal.

[0152] wait for 100 ns;

[0153] tmp_a:=a;

[0154] tmp_a:=1;

[0155] tmp_a:=tmp_a+1;

[0156] a<=tmp_a;

[0157] wait for 100 ns;

[0158] If, however, an assignment destination corresponds to a SpecC language port variable, assignment is made to a signal with the OUT attribute instead of the above signal.

[0159] Then, it is determined that weather the variable a is a shared variable with reference to the preservation made in processing 0. If the variable a is the shared variable, a data signal is generated based on a function name. A description, for example, “a_out_f<=tmp_a; (note that, “f” is the function name)”, is generated. This description means that the value of “tmp_a” is assigned to the data signal, namely “a_out_f”.

[0160] At the same time, an assignment timing signal based on the same function name, for example, “a_otrig_f” is also generated. Following to the above “a_out_f<tmp_a;” code, a code described bellow is inserted.

[0161] sig_otrig_f<=‘1’;

[0162] wait until CLK=‘1’ and CLK′EVENT;

[0163] sig_otrig_f<=‘0’;

[0164] If a SpecC language variable is of the event type, no temporary variable is generated.

[0165] Assume that in a method of representing the occurrence of an event, an event signal takes a value of ‘1’ during one clock. With regard to an event variable, “notify e;” corresponds to assignment.

[0166] notify e;

[0167] waitfor 100;

[0168] The above code is made to correspond to the following code:

[0169] e<=‘1’;

[0170] wait until CLK=‘1’ and CLK′EVENT;

[0171] e<=‘0’;

[0172] wait for 100 ns;

[0173] Although an event is referred to at “wait e;”, a VHDL code corresponding to this code is

[0174] wait e=‘1’;

[0175] (Processing 8) A SpecC language class can form another class into an instance. The formation of an instance is made to correspond to a VHDL port_map declaration. However, a port may be segmented into a plurality of elements in processing 3 described above. For this reason, if a port is connected to a local variable, and the same signal is connected to a port variable, a signal with the same directional attribute is connected.

[0176] Consider, for example, the following SpecC language code: behavior B0(inout int b); behavior B1(inout int 1) { B2 aB2(a); //. . . }; A VHDL code corresponding to this code is Entity B1 is port(a:in integer; a_out integer; . . .); end B1; Architecuture B1 od B1 is Component B0 is port(b: in integer; b_out: out integer; . . .); end component; begin aB2: B2 port map (a, a_out, . . .); -- . . . end B1;

[0177] <Value Solving Process Creation Processing (Value Solving Process Creation Section 3)>

[0178] (Processing 9′) A value solving process is generated with respect to the signal, namely “sig”, which is generated by replacing the variable thereto which is detected in advance as the shared variable in processing 0. Input signals to the value solving process are the signals which are generated with respect to the variables considered in processing 7′. An output signal from the value solving process is assumed as the signal sig.

[0179] The value solving process handles, for a signal relating to function execution control, processing associated with an execution trigger and argument altogether. Note that the execution trigger signal can play a role similar to that of an assignment timing signal.

[0180] (Processing 10) If a signal to which the value solving process created by processing 9′ described above is output is Entity Port, an assignment timing signal may be created in processing 9′. In this case, as an output of the value solving process, an assignment timing signal is added, and processing is added to change the value of the assignment timing signal at the timing when the value solving process performs processing and outputs the resultant data to an output destination.

[0181] With the above procedure, for example, a VHDL code having a structure like that shown in FIG. 5 is created from a SpecC language code having a structure like that shown in FIG. 4.

[0182] Another example of the processing performed by this language model conversion apparatus will be described next.

[0183]FIG. 9 shows another example of the procedure executed by this language model conversion apparatus.

[0184] In general, a SpecC language code has a tree structure formed among classes. Therefore, a VHDL code output in accordance with the procedure in FIG. 6 upon reception of the SpecC language code also has a tree structure formed among Entity-Architecture pairs. That is, with regard to the value solving process created in the value solving process creation processing (processing 9 and processing 10) based on the procedure shown in FIG. 6, a tree structure of the value-solving process is generally formed in accordance with the tree structure.

[0185] In the procedure shown in FIG. 9, first of all, a procedure similar to that shown in FIG. 6 is performed, and then the value solving process creation section 3 performs value solving process removal processing (processing 11 and processing 12). If a program has a hierarchical structure, one value solving process is created. For example, of the value solving processes (see FIG. 5) created by the procedure shown in FIG. 6, the value solving process at the highest level is integrated with the value solving processing having the hierarchical structure. As a result, for example, the structure shown in FIG. 10 is obtained. In value solving processing removable processing, all the processes except for the process at the highest level are removed, and hence the assignment data signal and assignment timing signal belonging to a lower level are connected as port signals of each component to a component at an upper level.

[0186] Value solving process removable processing will be described below.

[0187] <Value Solving Process Removable Processing (Value Solving Process Creation Section 3)>

[0188] (Processing 11) A value solving process having no assignment timing signal at its output exists at the highest level of the value solving process. Other processes will be called “removable value solving processes”. The removable value solving processes are removed.

[0189] (Processing 12) The input of each process removed in processing 11 described above is developed into an Entity port. The output port of the removed process is removed. This processing is sequentially performed from the value solving process at the lowest level. When a value solving process at an intermediate level is processed, the input signal port portion of port_map is replaced with another port group, and the replacing signal group is regarded as an input signal. Finally, the input of the value solving process at the highest level becomes a data signal and assignment timing signal from a process having assignment processing to signals at all the levels.

[0190] As described above, according to this embodiment, a software description containing parallel programs and a variable shared among the programs can be converted into a hardware description at the operation level which operates in the same manner.

[0191] A case where parallel processes are hierarchically arranged can also be properly handled. Note that an arrangement for forming value solving processes into a hierarchical structure or an arrangement for leaving only a value solving process at the highest level may be selected (in the former case, operation may be performed up to processing 10; in the latter case, operation may be performed up to processing 12). For example, when the number of port signals is to be decreased, the former arrangement is selected, whereas when a process structure is hierarchically deep and any excess wait processing is to be avoided, the latter arrangement is selected.

[0192]FIG. 11 shows another arrangement called a language model conversion apparatus according to an embodiment of the present invention. This language model conversion apparatus is obtained by adding a value solving process conversion section 4 to the arrangement shown in FIG. 1.

[0193] Value solving process conversion processing will be briefly described below with reference to FIG. 12 (a view for explaining a hardware description language model). Referring to FIG. 12, reference numeral 2015 denotes a calling-side process; 2016, a called-side process; 2010, an execution activation trigger signal to a (calling-side) process; 2011, an execution state signal from a (called-side) process; 2012, a procedure call switching process (the process obtained by converting a value solving process by value solving process conversion processing) for calling a process; 2013, an execution activation trigger signal for calling another process from a (calling-side) process; and 2014, an execution state signal for calling another process from a (calling-side) process.

[0194] Procedure calling between parallel programs in a software description language model is expressed as follows in a hardware description language model.

[0195] As a code for calling a procedure for converting parallel programs into parallel programs, the following code is created.

[0196] A procedure is called by using the trigger signal 2013 (2011) output from the calling-side process 2015 and the execution state signal 2011 (2014) output from the called-side process 2016. In addition, the argument signal output from the calling-side process and the return value signal output from the called-side process may be used.

[0197] (1) Assume that a trigger is enabled until a called-side process is actually executed.

[0198] (2) For the called-side process, a procedure call switching process for switching an (output) trigger signal, argument, (input) execution state, and return value signal is created.

[0199] (3) For each parallel process corresponding to the called-side process, a trigger signal (to be output to a calling process), argument, execution state (input to the calling process), and return value signal are prepared separately.

[0200] The procedure call switching process 2012 sequentially executes processing under the following enabling condition for each input trigger (see FIG. 15).

[0201] Processing to be executed under the enabling condition for each input trigger:

[0202] (1) Other execution state signals are disabled.

[0203] (2) An output trigger is enabled. At the same time, an argument signal value, if any, from a process is set as the value of an output argument signal.

[0204] (3) When the input execution state signal is enabled, the execution state signal for the process is enabled.

[0205] (4) When the input execution state signal is disabled, the process state signal is disabled. At the same time, an input return value signal, if any, is converted into a process return value signal value.

[0206] Assume that in a hardware description language model output after forming the procedures in an input software description language model into a hierarchical structure, parallel processes are formed into a hierarchical structure, as shown in FIG. 4. In this case, as shown in FIG. 14, a procedure call switching process is defined with respect to one process at each level, as shown in FIG. 14. If, however, there is no need to perform switching, connection is made without the mediacy of a procedure call switching process.

[0207]FIG. 13 shows a procedure executed by this language model conversion apparatus. According to the procedure shown in FIG. 13, a procedure similar to that shown in FIG. 6 is executed. Procedure calling between parallel programs in a software description language model is also handled as an access to a shared variable between the parallel programs. Following a procedure similar to that shown in FIG. 6, a value solving process is created with respect to procedure calling between parallel programs. In the procedure shown in FIG. 13, value solving process conversion processing (processing 13) (to be described later) is executed by the value solving process conversion section 4 to convert one of the value solving processes (see FIG. 3) which corresponds to procedure calling between the parallel programs into a procedure call switching process (see FIG. 12). Note that processes that do not correspond to procedure calling between the parallel programs are left as value solving processes.

[0208] The procedure call solving (switching )process may be executed without going through the value solving processes.

[0209] Value solving process conversion processing will be described below.

[0210] <Value Solving Process Conversion Processing (Value Solving Process Conversion Section 4)>

[0211] (Processing 13) A value solving process for transmitting process control signals (in addition to an execution trigger signal and execution state signal, argument signal and return value data signal) created by processing 4 in the skeletal code creation processing is replaced with the process created by processing 9 in the value solving process creation processing. More specifically, the following replacement is performed.

[0212] (Processing 13-1)

[0213] First of all, signal definitions are added. As an execution state signal, a signal common to the respective calling-side processes is prepared for each calling process. Likewise, a return value signal is also additionally defined for each calling process.

[0214] (Processing 13-2)

[0215] Signal replacement is then performed in a calling-side process. More specifically, an execution state signal in the “wait until” condition is replaced with the signal created in processing 13-1. The return value signal reference portion is also replaced in the same manner.

[0216] (Processing 13-3)

[0217] A value solving process for an execution trigger signal is replaced with the following process.

[0218] Inputs to the process include the execution state signal and return value signal output from the called process in addition to an execution trigger signal and argument data signal from each calling process. Outputs from the process include an execution trigger signal and argument data signal to the called process in addition to an execution state signal and return value signal for each calling process signal.

[0219] In addition, this process implements the operation shown in FIG. 15 or equivalent operation. For example, the following are operations to be implemented:

[0220] (1) There is an infinite loop for monitoring an execution trigger. A condition for exiting from this loop is to enable at least one value of input execution trigger signals.

[0221] (2) A conditional branch under the condition that each execution trigger signal is enabled immediately after the flow exits from the loop is prepared. Assume that this conditional branch is set in a sequential serial as follows: if condition 1 then   processing 1; end if; if condition 2 then   processing 2; end if; ...

[0222] (3) The following are processes to be performed when the respective conditions are satisfied:

[0223] (3-1) An execution trigger signal value for a called process is enabled.

[0224] (3-2) The flow waits until an execution state signal from the called process is enabled.

[0225] (3-3) An execution state signal to a calling process is enabled.

[0226] (3-4) The flow waits until the execution state signal from the called process is disabled.

[0227] (3-5) The execution state signal from the calling process is disabled, and the return value signal value from the called process is transmitted to the return value signal for the calling process.

[0228] Another example of the processing performed by this language model conversion apparatus will be described next.

[0229]FIG. 16 shows another example of the procedure executed by this language model conversion apparatus.

[0230] In this procedure, the value solving process conversion processing (processing 13) shown in FIG. 13 is performed after the skeletal code creation processing (processing 1 to processing 6), code replacement creation processing (processing 7 and processing 8), value solving process creation processing (processing 9 and processing 10), and value solving process conversion processing (processing 13) shown in FIG. 13 are performed.

[0231] If parallel processes are formed into a hierarchical structure, hierarchically created procedure call switching processes except for the process at the highest level are not created. Input/output signals for a lower-level process are used as input/output signals for the remaining process. Port signals required for this operation are created.

[0232] As a consequence, for example, the structure shown in FIG. 14 is converted into the structure shown in FIG. 17.

[0233] As has been described above, according to this embodiment, when parallel programs in a software language are to be converted into a hardware description, the programs can be converted into a hardware operation description that realizes exclusive process execution processing corresponding to procedure calling (i.e., allows exclusive calling).

[0234] In addition, this embodiment can handle a case where parallel processes are hierarchically arranged. Note that either an arrangement for forming procedure call solving processes into a hierarchical structure or an arrangement for leaving only the procedure call solving process at the highest level may be selected (in the former case, processing 1 to processing 10 and processing 13 may be performed, whereas in the latter case, processing 1 to processing 13 may be performed). For example, when the number of port signals is to be decreased, the former arrangement is selected, whereas when a process structure is hierarchically deep and any excess wait processing is to be avoided, the latter arrangement is selected.

[0235] Each function described above can be implemented as software.

[0236] In addition, this embodiment can be practiced as a program for causing a computer to execute predetermined means (or causing the computer to function as predetermined means or to realize predetermined functions) or a computer-readable recording medium on which the program is recorded.

[0237] Additional advantages and modifications will readily occur to those skilled in the art. Therefore, the invention in its broader aspects is not limited to the specific details and representative embodiments shown and described herein. Accordingly, various modifications may be made without departing from the spirit or scope of the general inventive concept as defined by the appended claims and their equivalents. 

1. A software/hardware language model conversion method for converting a first code described in a software description language to a second code described in a hardware description language, the method comprising: converting the first code to the second code; detecting from the second code a plurality of processes that correspond to a plurality of parallel procedures in the first code; identifying which ones of the plurality of processes assign values to an identical shared variable; and generating a value solving process for the detected processes corresponding to the parallel procedures, wherein the value solving process includes pairs of a data signal and an assignment timing signal from each of the detected processes as an input, includes any one of data signals corresponding to a change of the assignment timing signal, as an output, and maintains the data signals unless an input signal is received. 2-4 (Canceled).
 5. A software/hardware language model conversion method for converting a first code described in a software description language to a second code described in a hardware description language, the method comprising: detecting from the first code a plurality of processes that correspond to a plurality of parallel procedures in the second code; identifying which ones of the plurality of parallel procedures assigns values to an identical shared variable; converting the first code to the second code; and generating a value solving process for the detected processes corresponding to the parallel procedures, wherein the value solving process includes pairs of a data signal and an assignment timing signal from each of the detected processes as an input, includes any one of data signals corresponding to a change of the assignment timing signal, as an output, and maintains the data signals unless an input signal is received. 6-8 (Canceled).
 9. A software/hardware language model conversion method for converting a first code described in a software description language to a second code described in a hardware description language, the method comprising: converting the first code to the second code; detecting from the second code a plurality of processes that correspond to a plurality of parallel procedures in the first code; identifying which ones of the plurality of processes assign values to an identical shared variable; and generating a procedure call solving process which exclusively controls a call operation to the parallel procedure by the detected process, wherein the procedure call solving process includes pairs of a call timing signal and an argument data signal, from each of the detected processes, as an input, includes terminal signal and a return value signal, as an output to the processes, from the called procedure, and performs exclusive processing with respect to calls from a plurality of processes. 10-11 (Canceled).
 12. A software/hardware language model conversion method for converting a first code described in a software description language to a second code described in a hardware description language, the method comprising: detecting from the first code a plurality of procedures that correspond to a plurality of parallel procedures in the second code; identifying which ones of the plurality of parallel procedures assign values to an identical shared variable; converting the first code to the second code; and generating a procedure call solving process which exclusively controls an operation of a plurality of processes corresponding to the detected procedures, wherein the procedure call solving process includes pairs of a call timing signal and an argument data signal from each of the detected processes, as an input, includes a terminal signal and a return value signal, as an output to the processes, from the called procedure, and performs exclusive processing with respect to calls from a plurality of processes. 13-14. (Canceled).
 15. A software/hardware language model conversion method for converting a first code described in a software description language to a second code described in a hardware description language, the method comprising: converting the first code to the second code; detecting from the second codes a plurality of process that correspond to a plurality of parallel procedures in the first code; identifying which ones of the plurality of processes assign values to an identical shared variable; generating a value solving process for the detected processes corresponding to the parallel procedures, wherein the value solving process includes pairs of a data signal and an assignment timing signal from each of the detected processes, as an input, includes any one of data signals corresponding to a change of the assignment timing signal, as an output, and maintains the data signals unless an input signal is received; converting the value solving process relating to a procedure call between parallel programs to a procedure call solving process wherein the procedure call solving process includes pairs of an call timing signal and an argument data signal from each of the detected processes, as an input, includes a terminal signal and a return value signal, as an output to the processes, from the called procedure, and performs exclusive processing with respect to calls from a plurality of processes.
 16. A software/hardware language model conversion method for converting a first code described in a software description language to a second code described in a hardware description language, the method comprising: detecting from the first code a plurality of processes that correspond to a plurality of parallel procedures in the second code; identifying which ones of the plurality of processes assign values to an identical shared variable; and converting the first code to the second code; generating a value solving process for the detected processes corresponding to the parallel procedures, wherein the value solving process includes pairs of a data signal and an assignment timing signal from each of the detected processes, as an input, includes any one of data signals corresponding to a change of the assignment timing signal, as an output, and maintains the data signals unless an input signal is received, each data signal indicating a value of the shared variable; and converting the one of the value solving process relating to a procedure call between parallel programs to a procedure call solving process, wherein the procedure call solving process includes pairs of a call timing signal and an argument data signal from each of the detected processes, as an input, includes a terminal signal and a return value signal, as an output to the processes, from the called procedure, and performs exclusive processing with respect to calls from a plurality of processes.
 17. A computer program product comprising: a computer storage medium and a computer program code mechanism embedded in the computer storage medium for causing a computer to convert a first code described in a software description language to a second code described in a hardware description language, the computer code mechanism comprising: a computer code device configured to convert the first code to the second code; a computer code device configured to detect from the second code a plurality of processes that correspond to a plurality of parallel procedures in the first code; a computer code device configured to identity which ones of the plurality of processes assign values to an identical shared variable; and a computer code device configured to generate a value solving process for the detected processes corresponding to the parallel procedures, wherein the value solving process includes pairs of a data signal and an assignment timing signal from each of the detected processes as an input, includes any one of data signals corresponding to a change of the assignment timing signal, as an output, and maintains the data signals unless an input signal is received. 18-20. (Canceled).
 21. A computer program product comprising: a computer storage medium and a computer program code mechanism embedded in the computer storage medium for causing a computer to convert a first code described in a software description language to a second code described in a hardware description language, the computer code mechanism comprising: a computer code device configured to detect from the first code a plurality of processes that correspond to a plurality of parallel procedures in the second code; a computer code device configured to identify which ones of the plurality of processes assign values to an identical shared variable; a computer code device configured to convert the first code to the second code; and a computer code device configured to generate a value solving process for the detected processes corresponding to the parallel procedures, wherein the value solving process includes pairs of a data signal and an assignment timing signal from each of the detected processes as an input, includes any one of data signals corresponding to a change of the assignment timing signal, as an output, and maintains the data signals unless an input signal is received. 22-24. (Canceled).
 25. A computer program product comprising: a computer storage medium and a computer program code mechanism embedded in the computer storage medium for causing a computer to convert a first code described in a software description language to a second code described in a hardware description language, the computer code mechanism comprising: a computer code device configured to convert the first code to the second code; a computer code device configured to detect from the second code a plurality of processes that correspond to a plurality of procedures in the first code; a computer code device configured to identify which ones of the plurality of processes assign values to an identical shared variable; and a computer code device configured to generate a procedure call solving process which exclusively controls a call operation to the parallel procedure by the detected process, wherein the procedure call solving process includes pairs of a call timing signal and an argument data signal, from each of the detected processes, as an input, includes a terminal signal and a return value signal, as an output to the processes, from the called procedure, and performs exclusive processing with respect to calls from a plurality of processes. 26-27. (Canceled).
 28. A computer program product comprising: a computer storage medium and a computer program code mechanism embedded in the computer storage medium for causing a computer to convert a first code described in a software description language to a second code described in a hardware description language, the computer code mechanism comprising: a computer code device configured to detect from the first code a plurality of procedures that correspond to a plurality of parallel procedures in the second code; a computer code device configured to identify which ones of the plurality of procedure assign values to an identical shared variable; a computer code device configured to convert the first code to the second code; and a computer code device configured to generate a procedure call solving process which exclusively controls an operation of a plurality of processes corresponding to the detected procedures, wherein the procedure call solving process includes pairs of a call timing signal and an argument data signal from each of the detected processes, as an input, includes a terminal signal and a return value signal, as an output to the processes, from the called procedure, and performs exclusive processing with respect to calls from a plurality of processes. 29-30. (Canceled).
 31. A computer program product comprising: a computer storage medium and a computer program code mechanism embedded in the computer storage medium for causing a computer to convert a first code described in a software description language to a second code described in a hardware description language, the computer code mechanism comprising: a computer code device configured to convert the first code to the second code; a computer code device configured to detect from the second code a plurality of processes that correspond to a plurality of parallel procedures in the first code; a computer code device configured to identify which ones of the plurality of processes assign values to an identical shared variable; a computer code device configured to generate a value solving process for the detected processes corresponding to the parallel procedures, wherein the value solving process includes pairs of a data signal and an assignment timing signal from each of the detected processes, as an input, includes any one of data signals corresponding to a change of the assignment timing signal, as an output, and maintains the data signals unless an input signal is received; a computer code device configured to convert the value solving process relating to a procedure call between parallel programs to a procedure call solving process wherein the procedure call solving process includes pairs of a call timing signal and an argument data signal from each of the detected processes, as an input, includes a terminal signal and a return value signal, as an output to the processes, from the called procedure, and performs exclusive processing with respect to calls from a plurality of processes.
 32. A computer program product comprising: a computer storage medium and a computer program code mechanism embedded in the computer storage medium for causing a computer to convert a first code described in a software description language to a second code described in a hardware description language, the computer code mechanism comprising: a computer code device configured to detect from the first code a plurality of processes that correspond to a plurality of parallel procedures in the second code; a computer code device configured to identify which ones of the plurality of processes assign values to an identical shared variable; a computer code device configured to convert the first code to the second code; a computer code device configured to generate a value solving process for the detected processes corresponding to the parallel procedures, wherein the value solving process includes pairs of a data signal and an assignment timing signal from each of the detected processes, as an input, includes any one of data signals corresponding to a change of the assignment timing signal, as an output, and maintains the data signals unless an input signal is received, each data signal indicating a value of the shared variable; and a computer code device configured to convert the one of the value solving process relating to a procedure call between parallel programs to a procedure call solving process, wherein the procedure call solving process includes pairs of a call timing signal and an argument data signal from each of the detected processes, as an input, includes a terminal signal and a return value signal, as an output to the processes, from the called procedure, and performs exclusive processing with respect to calls from a plurality of processes. 